package Student;

import java.util.Scanner;

class Student {
    private String name;
    private String sex;
    private String studentID;
    private int age;
    private String major;

    public Student() {
    }

    public Student(String name, String sex, String studentID, int age, String major) {
        this.name = name;
        this.sex = sex;
        this.studentID = studentID;
        this.age = age;
        this.major = major;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public void setStudentID(String studentID) {
        this.studentID = studentID;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String toString() {
        return "姓名：" + name + "，性别：" + sex + "，学号：" + studentID + "，年龄：" + age + "，专业：" + major;
    }

    public void printInfo() {
        System.out.println(toString());
    }


}
public class Test {
    public static void main(String[] args) {

        Student Tom = new Student();
        Scanner reader = new Scanner(System.in);

        String name = reader.nextLine();
        Tom.setName(name);

        String sex = reader.nextLine();
        Tom.setSex(sex);

        String studentID = reader.nextLine();
        Tom.setStudentID(studentID);

        int age = reader.nextInt();
        Tom.setAge(age);
        reader.nextLine();

        String major = reader.nextLine();
        Tom.setMajor(major);

        Tom.printInfo();
    }
}
